package org.ilovecode.display {
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import gs.TweenLite;
	import gs.easing.Linear;
	
	/**
	 * ...
	 * @author Vjekoslav Ratkajec
	 */
	public class BaseFloor extends MovieClip {
		
		public var graphic:MovieClip;
		public var baloon:MovieClip;
		
		public function BaseFloor() {
			init();
		}
		
		private function init():void {
			graphic.alpha = 0;
			baloon.visible = false;
			this.buttonMode = true;
			this.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
			this.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
		}
		
		private function mouseOver(event:MouseEvent):void {
			show();
		}
		
		private function mouseOut(event:MouseEvent):void {
			hide();
		}
		
		public function show():void {
			TweenLite.to(graphic, 1, { alpha:0.5 } );
			baloon.visible = true;
		}
		
		public function hide():void {
			TweenLite.to(graphic, 1, {alpha:0});
			baloon.visible = false;
		}
		
	}

}